package com.ruoyi.model.comment.dto;

import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


/**
 * @author 张怀秋
 * &#064;date  2024-03-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class CommentDto {

    /**
     * 评论id
     */
    private String id;

    /**
     * 评论类型(代表对文章或者活动和竞赛的区分)
     */
    @Excel(name = "评论类型(代表对文章或者活动和竞赛的区分)")
    private String type;

    private String typeName;

    public String getTypeName() {
        if (this.type.equals("0")) {
            this.typeName = "contest-comment-list";
        }
        if (this.type.equals("1")) {
            this.typeName = "activity-comment-list";
        }
        if (this.type.equals("2")) {
            this.typeName = "blog-comment-list";
        }
        return typeName;
    }

    /**
     * 被评论的数据的id
     */
    @Excel(name = "被评论的数据的id")
    private String activityId;

    /**
     * 根评论id
     */
    @Excel(name = "根评论id")
    private String rootId;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String content;

    private String userName;

    private String userId;

    /**
     * 所回复的目标评论的user_id
     */
    @Excel(name = "所回复的目标评论的user_id")
    private String toCommentUserId;

    /**
     * 回复目标评论id
     */
    @Excel(name = "回复目标评论id")
    private String toCommentId;


}
